package com.game_info.service.impl;

import java.util.List;

import com.game_info.mapper.GamesInfoMapper;
import com.game_info.service.GamesInfoService;
import com.game_info.vo.GamesInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * games_info表Service业务层处理
 * 
 * @author ttj
 * @date 2020-04-14
 */
@Service
public class GamesInfoServiceImpl implements GamesInfoService
{
    @Autowired
    private GamesInfoMapper gamesInfoMapper;

    /**
     * 根据id查询
     * 
     * @param infoId
     * @return
     */
    @Override
    public GamesInfo selectGamesInfoById(Integer infoId)
    {
        return gamesInfoMapper.selectGamesInfoById(infoId);
    }

    /**
     * 查询列表
     * 
     * @param gamesInfo
     * @return
     */
    @Override
    public List<GamesInfo> selectGamesInfoList(GamesInfo gamesInfo)
    {
        return gamesInfoMapper.selectGamesInfoList(gamesInfo);
    }

    /**
     * 分页查询
     * @param startPages
     * @param pagesSize
     * @return
     */
    @Override
    public List<GamesInfo> selectGamesInfoListLimit(Integer startPages,Integer pagesSize){
        return gamesInfoMapper.selectGamesInfoListLimit(startPages,pagesSize);
    }

    /**
     * 根据关键词模糊查询全部字段信息
     * @param keyword
     * @return
     */
    public List<GamesInfo> selectLikeKeyword(String keyword){
        return gamesInfoMapper.selectLikeKeyword(keyword);
    }

    /**
     * 获取数据总条数
     */
    @Override
    public Integer selectListCount(){
        return gamesInfoMapper.selectListCount();
    }

    /**
     * 新增
     * 
     * @param gamesInfo
     * @return 结果
     */
    @Override
    public int insertGamesInfo(GamesInfo gamesInfo)
    {
        return gamesInfoMapper.insertGamesInfo(gamesInfo);
    }

    /**
     * 修改
     * 
     * @param gamesInfo
     * @return 结果
     */
    @Override
    public int updateGamesInfo(GamesInfo gamesInfo)
    {
        return gamesInfoMapper.updateGamesInfo(gamesInfo);
    }

    /**
     * 删除对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteGamesInfoByIds(String ids)
    {
        return gamesInfoMapper.deleteGamesInfoByIds(ids.split(""));
    }

    /**
     * 根据id删除信息
     * 
     * @param infoId
     * @return 结果
     */
    @Override
    public int deleteGamesInfoById(Integer infoId)
    {
        return gamesInfoMapper.deleteGamesInfoById(infoId);
    }
}
